home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- INTRODUCTION TO
- THE MANDELBROT EXPLORER
-
-
- The programs MANDELEX.EXE (or MANDELLO.EXE),
- PICPAC.EXE, UNPACPIC.EXE, PLOTPAC.EXE, and PLOT.EXE are all
- meant to work together to produce regions of the Mandelbrot
- set on your screen.
- All of the programs require DOS 2.0 or later. The
- creation programs (MANDELEX.EXE and MANDELLO.EXE) require an
- 8087 mathematics co-processor (they will crash computers
- which do not have an 8087 installed). MANDSLEX and MANDSLO
- are the same programs, but with floating point routines so
- they can work without the 8087. Even with the 8087,
- generating a picture can take up to 12 hours (although in
- most cases, the program requires quite a bit less time--
- especially if you use MANDELLO.EXE). MANDELEX.EXE requires
- an IBM enhanced color graphics adapter (or BIOS equivalent--
- it will also work with either the monochrome monitor or
- enhanced color display), and MANDELLO.EXE should work with
- any IBM compatible color card. I do not know whether it
- will work on any of the monochrome graphics cards. If it
- does not, and you would like for me to try and make it work
- on yours, send me (Bradley Dyck Kliewer; DK Micro
- Consultants; 3001 E. 24th St.; Minneapolis, MN 55406) the
- technical information about graphics on your system, and I
- will see if I can modify the program.
- The program can zoom in on areas of the Mandelbrot set.
- You must specify the coordinates of the lower left hand
- corner, and the length of the side. The vertical axis is
- the imaginary part and the horizontal axis is the real part.
- The default settings draw the entire set (from -2.00 to 0.50
- and -1.25i to 1.25i, obtained by typing -2.00 for the real
- part, -1.25 for the imaginary part, and 2.50 for the length
- of the side [or by hitting the enter key at each prompt]).
- If the program cannot use the value you give it, i.e. if it
- is not a number or in an improper format, it will give the
- prompt again. Note that integers must be followed by a
- decimal point e.g. "0" must be entered as "0." and "1" as
- "1.". Numbers may be entered in floating point notation.
- One area that is very interesting is -.73388, .1964567i
- (don't type the "i"), .0000012. Also, in this same area at
- different scales, try -.73395, .19645i, .0005 and -.73388,
- .1964567i, .0000061. This might give you a feel for the
- zooming effect.
- This program was inspired by an article in the August
- 1985 issue of "Scientific American." If you are interested
- in how the program works, pictures generated by a similar
- program, and suggestions of other places to look, read the
- article by A. K. Dewdney on page 16. Another book which
- might be of interest is "The Fractal Geometry of Nature" by
- Benoit B. Mandelbrot. I am hoping to write programs for
- other fractals (especially the dragon curves). If you
- register your program with me (by sending $10 with your name
-
-
-
-
-
-
-
-
-
-
-
-
- and address) I will inform you of updates to the program.
- Also feel free to send comments about improvements, or other
- fractals you would like to see supported (along with the
- equation if you know it).
-
- RUNNING THE PROGRAMS
-
- Put the program disk in drive A: and type MANDELEX (or
- MANDELLO if you have a normal graphics adapter) at the DOS
- A> prompt. Enter the data (as described in the previous
- section) at the prompts. To save the screen before the
- program is finished, type "S" and a filename prompt will
- appear. To exit the program prematurely, type "E"--you will
- then need to confirm, "Y" to exit or "N" to continue and
- then confirm a save--"Y" to save, "N" to exit without
- saving. Filenames can be any legal path and name, however,
- I recommend very short names to prevent destroying portions
- of the picture with your text. So, I would keep the program
- in the drive (and directory) in which you wish to save the
- image. Note that high resolution images require 224000
- bytes and medium resolution images require 64000 bytes.
- If you have an enhanced graphics adapter, you can use
- the MANDELLO program to generate images more quickly, and
- then use MANDELEX to get more detailed views of the
- interesting pictures.
- Because the saved files are so long, I have written a
- program which will compress the size of MOST files. In some
- cases (in which colors are scattered very randomly) the
- program could expand the file size. To use this program,
- make sure the default drive contains the PICPAC program, and
- one of the drives contains the file you want to compress
- (pack). Type PICPAC. You will be prompted for the name of
- the file you want to pack and the name of the file to be
- created--be sure you use a different name.
- To expand a packed file, follow the procedure outlined
- above, except with the UNPACPIC file in the default drive
- and the file to be unpacked in one of the drives. Type
- UNPACPIC and respond to the prompts.
- Saved images can be re-created either from packed files
- or unpacked files. To generate an image from an unpacked
- file, make sure the saved file is in one of the drives and
- the PLOT file is in the default drive. Type PLOT and give
- the name of the image file at the prompt. If the file you
- want to use is packed, put the PLOTPAC file in the default
- drive and type PLOTPAC. The program will prompt you for the
- file name and the screen resolution.
- The plotting and packing programs are very flexible.
- They will accept any file (even copies of themselves--see
- "Godel, Escher, Bach" by Douglas Hofstadter)--however, I
- doubt that they are of much use. Some programs do generate
- interesting patterns if you use the PLOT or PLOTPAC programs
- on them. If you are going to experiment with these, I would
- recommend using copies of the data or program files that you
- plot, pack, or unpack, rather than the originals.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TECHNICAL INFORMATION
-
- The expanded files simply consist of a chain of color
- values (one byte corresponding to one pixel) from the lower
- right corner to the upper left corner of the screen. This
- allows a possibility of 256 colors, although the program
- does not support such devices at this time. The pack
- program consists of a color value followed by the number of
- pixels of that color (up to 255), in the same order as the
- expanded files. So, if you want to use these images with
- other programs, it should be very easy to read the data from
- these files and put it to use. One interesting idea would
- be to change the palette and color assignments, or to change
- the design. If you come up with any applications for these
- files I would be interested in hearing about them.
- The program may seem quite, slow. Be assured that the
- main constraint is the calculation time. I have optimized
- the 8087 code repeatedly, and it now runs about three times
- faster than the original. Most of the increase was obtained
- by using the stack for almost all of the 8087 operations
- (rather than reliance on memory). Points which appear as
- black have gone through the generating formula 1000 times--
- other colors, various fractions of that amount. Actual
- plotting time could probably be increased slightly, but at a
- loss of compatibility (and a few minutes should not make
- much difference in a program which takes a few hours to
- run). If anybody runs this program on an AT or another
- machine with a faster clock and/or processor, I would
- appreciate some benchmark information (coordinates used and
- time to completion--as well as the type of graphics adapter
- and mode used). The program does not run faster on an AT
- with a normal 80287, because the co-processor runs at a
- slower clock rate than the 80286, however there are kits
- available which use a faster 80287, and these are the
- systems I am interested in hearing about.
- As a rough guide for those who are interested, the 8087
- versions run over 25 times faster than the non-8087
- versions. The AT runs the non-8087 versions about three
- times faster, and the PC runs the 8087 version just a
- fraction faster than the AT.
- All of the programming was done in assembly language,
- with the exception of the non-8087 floating point routines
- which were written in compiled BASIC.
-
- If you are interested in changing the number of
- iterations, follow the instructions below. If you want to
- know more about the instructions given below, consult the
- DEBUG section of the DOS manual.
-
- To change the number of times the loop is used (the
- original value is 1000), follow these steps:
-
- 1. Enter the debugger and load the appropriate file e.g.
- DEBUG B:MANDSLO.EXE.
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2. Run the program to the point where the DS register is set
- (G 9 should do this).
-
- The addresses in the following instructions will be
- slightly different for the different versions of the
- program. For consistency, all examples will use
- MANDELLO.EXE, and will change the default value of 1000
- (3E8h) to 500 (1F4h). Values which may differ will have
- asterisks around them, and a table of the correct values
- appears at the end of the instructions. Also note that the
- code segment value (the first four digits before the colon)
- will probably be different, but for the following
- instructions it is insignificant unless you use the E
- command in place of the U command.
-
- 3. Type d *0080* and look for the line which looks something
- like this:
- 3508:*0080* 30 00 43 00 E8 03 00 00-FF FF FF FF C8 00 00 00
-
- 4. Change the values E8 and 03 to whatever new value you
- want (E8 03 is 1000, note that the bytes are in reverse
- order--normally this would be written 03E8h). So in this
- case, if you want 500 you would enter E *84* f4 1 to
- (E)nter at location 84 the values f4 and 1.
-
- 5. Type U *3d* and look for the following lines.
- 3463:*003D* C7068600E803 MOV WORD PTR [*0086*],03E8
- 3463:*0043* B8E803 MOV AX,03E8
- The value 03E8 hex needs to be change to the new value.
- This can be accomplished here by entering the following
- lines:
-
- A *003D* <return>
- MOV WORD PTR [*0086*],01F4 <return>
- MOV AX,01F4 <return>
- <return>
-
- Alternately, d CS:*0030* (where CS is the code segment
- value, in this case, 3463. This value will be different
- depending on the configuration of your computer) can be
- used to find the E8 03, and F4 01 can be entered by the
- method in the preceeding step.
-
- 6. Type U *0076* and find the following line.
- 3463:*0076* C7068600E803 MOV WORD PTR [*0086*],03E8
- Change the 03E8 to 01F4 as described above.
-
- 7. Type U *0114* and find the following line.
- 3463:*0114* B9E803 MOV CX,03E8
- Change it as described above. If you did everything
- correctly, you are now ready to run the modified program.
-
- 8. Type G, and the program will run.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MANDSLEX
- 352C:0080 58 00 43 00 E8 03 00 00-FF FF FF FF 5E 01 00 00
- 357F:003D C7068600E803 MOV WORD PTR [0086],03E8
- 357F:0043 B8E803 MOV AX,03E8
- 357F:00FF B9E803 MOV CX,03E8
-
-
- MANDELEX
- 3580:0042 C7067200E803 MOV WORD PTR [0072],03E8
- 3580:0048 B8E803 MOV AX,03E8
- 3580:0101 B9E803 MOV CX,03E8
-
-
- MANDELLO
- 357E:0042 C7067200E803 MOV WORD PTR [0072],03E8
- 357E:0048 B8E803 MOV AX,03E8
- 357E:007B C7067200E803 MOV WORD PTR [0072],03E8
- 357E:0116 B9E803 MOV CX,03E8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-